package com.my.config;

/**
 * @author WangLuoXin
 * &#064;Date 2024/9/18  13:42
 **/
public class GlobalConfig {

    private System system = new System();

    private WebSocket webSocket = new WebSocket();

    public static class WebSocket {

        //是否开始
        private Boolean open = Boolean.FALSE;

        //链接url
        private String url;

        public Boolean getOpen() {
            return open;
        }

        public void setOpen(Boolean open) {
            this.open = open;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        @Override
        public String toString() {
            return "WebSocket{" +
                    "open=" + open +
                    ", url='" + url + '\'' +
                    '}';
        }
    }

    public static class System {
        //系统端口号
        private Integer port = 8080;

        //工作线程数
        private Integer workThread = 10;

        //控制线程数
        private Integer masterThread = 1;

        public Integer getPort() {
            return port;
        }

        public void setPort(Integer port) {
            this.port = port;
        }

        public Integer getWorkThread() {
            return workThread;
        }

        public void setWorkThread(Integer workThread) {
            this.workThread = workThread;
        }

        public Integer getMasterThread() {
            return masterThread;
        }

        public void setMasterThread(Integer masterThread) {
            this.masterThread = masterThread;
        }

        @Override
        public String toString() {
            return "System{" +
                    "port=" + port +
                    ", workThread=" + workThread +
                    ", masterThread=" + masterThread +
                    '}';
        }
    }

    public System getSystem() {
        return system;
    }

    public void setSystem(System system) {
        this.system = system;
    }

    public WebSocket getWebSocket() {
        return webSocket;
    }

    public void setWebSocket(WebSocket webSocket) {
        this.webSocket = webSocket;
    }
}
